package com.ums.scumspay.bigdataimport.QryFile;


import com.ums.scumspay.bigdataimport.Util.DoubleUtil;
import com.ums.scumspay.bigdataimport.constant.FilePathConstant;
import lombok.extern.slf4j.Slf4j;

import java.io.File;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;

/**
 * 类名 MerXnService
 * 作者 LYC
 * 时间 2022.09.12 2022/9/12 9:01
 * 描述：商户效能execl的处理
 */
public class MerXnService {
    /**
     * 作者 LYC
     * 时间 2022/9/12 9:02
     * 参数 [filepath]
     * 返回值 java.util.HashMap<java.lang.String,java.util.ArrayList<java.util.ArrayList<java.lang.String>>>
     * 方法描述：读取效能的execl表
     **/
    public static HashMap<String, ArrayList<ArrayList<String>>> readFile(String filepath) {
        HashMap<String, ArrayList<ArrayList<String>>> map = ExecUtil.readExcel(new File(filepath), 1);
        return map;
//        return  null;
    }

    public static void main(String[] args) throws IOException {
        String month = "202307";
        // EFF_ACCOUNTS_RECEIVABLE(readFile("F:\\bigdata\\temp\\2023.7\\7月\\综合部-表2.应收账款-综合部.xlsx").get("sheet0"),month);
        // EFF_CHECKWORK(readFile("F:\\bigdata\\temp\\2023.7\\7月\\综合部-表5.考勤-202307.xlsx").get("sheet0"),month);
        //   EFF_CONTRACT(readFile("F:\\bigdata\\temp\\2023.7\\7月\\综合部-表7.合同回收-202307.xlsx").get("sheet0"),month);
        //EFF_CUSTOMER_TASK(readFile("F:\\bigdata\\temp\\3月\\3月\\终端部-表1.客户工单派工情况-10月.xlsx").get("sheet0"),month);
        // EFF_MARKET_ADVANCES(readFile("F:\\bigdata\\temp\\2023.7\\7月\\综合部-表4.营销联盟垫款明细-综合部.xlsx").get("sheet0"),month);
        //  EFF_MARKET_INVOICE(readFile("F:\\bigdata\\temp\\2023.7\\7月\\综合部-表3.营销联盟应收票据明细-综合部.xlsx").get("sheet0"),month);
        //  EFF_MERCHANT_TABLE1(readFile("F:\\bigdata\\temp\\2023.7\\7月\\风险部-表4.特约商户管理-入网3个月确认风险.xlsx").get("sheet0"),month);
        //EFF_MERCHANT_TABLE2(readFile("F:\\bigdata\\temp\\3月\\3月\\风险部-表5.特约商户管理-风险调查核实移机始终.xlsx").get("sheet0"),month);
        //EFF_MERCHANT_TABLE3(readFile("F:\\bigdata\\temp\\3月\\3月\\风险部-表5.特约商户管理-风险调查核实移机始终.xlsx").get("sheet0"),month);
        //EFF_MERCHANT_TABLE4(readFile("F:\\bigdata\\temp\\3月\\3月\\风险部-表7.特约商户风险管理-引发风险事件.xlsx").get("sheet0"),month);
        //EFF_MERCHANT_TABLE5(readFile("F:\\bigdata\\temp\\3月\\3月\\风险部-表5.特约商户管理-风险调查核实移机始终.xlsx").get("sheet0"),month);
        //EFF_MERCHANT_TABLE6(readFile("F:\\bigdata\\temp\\3月\\3月\\风险部-表5.特约商户管理-风险调查核实移机始终.xlsx").get("sheet0"),month);
        //EFF_NEGATIVE_RETURN(readFile("F:\\bigdata\\temp\\3月\\3月\\业务部-表1.负收益-202210.xlsx").get("sheet0"),month);
        EFF_OA_INFO(readFile("C:\\Users\\pengdeng\\Desktop\\Fw_ 2023年7月绩效数据表、效能表\\202307效能表\\综合部-表6.OA代办文件-202307.xls").get("sheet0"),month);
        // EFF_POS_DEPOSIT(readFile("F:\\bigdata\\temp\\2023.7\\7月\\综合部-表1.超期POS机具押金-综合部.xlsx").get("sheet0"),month);
        //FF_RISK_FUND_SUSPENSION(readFile("F:\\bigdata\\temp\\3月\\3月\\风险部-表10.资金暂缓.xlsx").get("sheet0"),month);
        //EFF_RISK_TASK(readFile("F:\\bigdata\\temp\\3月\\3月\\风险部-表1.风险派工-工单.xlsx").get("sheet0"),month);
        //EFF_RISK_TASK_OVERDUE(readFile("F:\\bigdata\\temp\\3月\\3月\\风险部-表2.风险派工-逾期.xlsx").get("sheet0"),month);
        //EFF_RISK_TASK_UNQUALIFIED(readFile("F:\\bigdata\\temp\\3月\\3月\\风险部-表3.风险派工-不合格.xlsx").get("sheet0"),month);
        // EFF_UMS_SCHOOL(readFile("F:\\bigdata\\temp\\2023.7\\7月\\综合部-表8.银商学堂-202307.xlsx").get("sheet0"),month);
        //EFF_POS_EFFICIENCY(readFile("F:\\bigdata\\temp\\3月\\3月\\终端部-表2.终端效能-10.xlsx").get("sheet0"),month);
    }
    public static File getFilePath(String month) {
        // File file = new File(FilePathConstant.filePath +"\\efficiency\\"+ month+ "\\efficiency.sql");
        File file = new File(FilePathConstant.filePath +"\\efficiency-"+month.substring(4,month.length())+".sql");
        return file;
    }

    public static void mergeInto(String tableName,String date) throws IOException {
        FileWriter fileWriter = new FileWriter(new File(FilePathConstant.filePath +"\\efficiency-mergeInto-"+date.substring(4,date.length())+".sql"),true);
        fileWriter.write("-- "+tableName);
        fileWriter.write("\r\n");
        fileWriter.write("merge into "+tableName+" P  using SYS_USER t1  on (P.PER_NAME = t1.USER_NAME  AND P.ASSESSMENT='"+date+"')    \n" +
                "    when matched then    \n" +
                "    update set P.DEPT_CODE = t1.DEPT_NO,PER_CODE=t1.USER_GH; \n" +
                "    commit;");
        fileWriter.write("\r\n");
        fileWriter.write("merge into "+tableName+" P  using DEPT_INFO t1  on (P.DEPT_CODE = t1.DEPT_NO AND P.ASSESSMENT='"+date+"' )    \n" +
                "    when matched then    \n" +
                "    update set P.DEPT_NAME = t1.DEPT_NAME; \n" +
                "commit;");
        fileWriter.flush();
        fileWriter.close();
    }

    public static void SqlExcuteFirst(String tableName,String date) throws IOException {
        FileWriter fileWriter = new FileWriter(new File(FilePathConstant.filePath + "\\efficiency-mergeInto.sql"));
        fileWriter.write("-- "+tableName);
        fileWriter.write("\r\n");
        fileWriter.write("merge into "+tableName+" P  using SYS_USER t1  on (P.PER_NAME = t1.USER_NAME  AND P.ASSESSMENT='"+date+"')    \n" +
                "    when matched then    \n" +
                "    update set P.DEPT_CODE = t1.DEPT_NO,PER_CODE=t1.USER_GH; \n" +
                "    commit;");
        fileWriter.write("\r\n");
        fileWriter.write("merge into "+tableName+" P  using DEPT_INFO t1  on (P.DEPT_CODE = t1.DEPT_NO AND P.ASSESSMENT='"+date+"' )    \n" +
                "    when matched then    \n" +
                "    update set P.DEPT_NAME = t1.DEPT_NAME; \n" +
                "commit;");
        fileWriter.flush();
        fileWriter.close();
    }
    /**
     * 作者 LYC
     * 时间 2022/9/12 9:04
     * 参数 [list]
     * 返回值 void
     * 方法描述：应收账款-综合部
     **/
    public static void EFF_ACCOUNTS_RECEIVABLE(ArrayList<ArrayList<String>> list, String _date) throws IOException {
        System.out.println("********************" + list.size());
        FileWriter fileWriter = new FileWriter(getFilePath(_date), true);
        fileWriter.write("-- EFF_ACCOUNTS_RECEIVABLE应收账款-综合部");
        fileWriter.write("\r\n");
        fileWriter.flush();
        for (int i = 2; i < list.size(); i++) {
            ArrayList<String> array = list.get(i);

            System.out.println("insert into EFF_ACCOUNTS_RECEIVABLE(ASSESSMENT,PER_NAME,MERNAME,FEETYPE,SETTLEMENT_PERIOD" +
                    ",ACCOUNTS_MONTH,KPI_YN,AMOUNT_RECEIVABLE,OVERDUE_AMOUNT,CYLE13,CYLE46,CYLE79,CYLE1012,CYLE1324,CYLE2536,CYLE37) " +
                    "values('" + _date + "','" + array.get(1) + "','" + array.get(2) + "','" + array.get(3) + "','" + array.get(4) + "'," +
                    "'" + array.get(5) + "','" + array.get(6) + "'," +
                    "'" + DoubleUtil.round(Double.parseDouble(array.get(7)), 2, 5) + "'," +
                    "'" + DoubleUtil.round(Double.parseDouble(array.get(8)), 2, 5) + "'," +
                    "'" + DoubleUtil.round(Double.parseDouble(array.get(9)), 2, 5) + "'," +
                    "'" + DoubleUtil.round(Double.parseDouble(array.get(10)), 2, 5) + "'," +
                    "'" + DoubleUtil.round(Double.parseDouble(array.get(11)), 2, 5) + "'," +
                    "'" + DoubleUtil.round(Double.parseDouble(array.get(12)), 2, 5) + "'," +
                    "'" + DoubleUtil.round(Double.parseDouble(array.get(13)), 2, 5) + "'," +
                    "'" + DoubleUtil.round(Double.parseDouble(array.get(14)), 2, 5) + "'," +
                    "'" + DoubleUtil.round(Double.parseDouble(array.get(15)), 2, 5) + "');");
            fileWriter.write("insert into EFF_ACCOUNTS_RECEIVABLE(ASSESSMENT,PER_NAME,MERNAME,FEETYPE,SETTLEMENT_PERIOD" +
                    ",ACCOUNTS_MONTH,KPI_YN,AMOUNT_RECEIVABLE,OVERDUE_AMOUNT,CYLE13,CYLE46,CYLE79,CYLE1012,CYLE1324,CYLE2536,CYLE37) " +
                    "values('" + _date + "','" + array.get(1) + "','" + array.get(2) + "','" + array.get(3) + "','" + array.get(4) + "'," +
                    "'" + array.get(5) + "','" + array.get(6) + "'," +
                    "'" + DoubleUtil.round(Double.parseDouble(array.get(7)), 2, 5) + "'," +
                    "'" + DoubleUtil.round(Double.parseDouble(array.get(8)), 2, 5) + "'," +
                    "'" + DoubleUtil.round(Double.parseDouble(array.get(9)), 2, 5) + "'," +
                    "'" + DoubleUtil.round(Double.parseDouble(array.get(10)), 2, 5) + "'," +
                    "'" + DoubleUtil.round(Double.parseDouble(array.get(11)), 2, 5) + "'," +
                    "'" + DoubleUtil.round(Double.parseDouble(array.get(12)), 2, 5) + "'," +
                    "'" + DoubleUtil.round(Double.parseDouble(array.get(13)), 2, 5) + "'," +
                    "'" + DoubleUtil.round(Double.parseDouble(array.get(14)), 2, 5) + "'," +
                    "'" + DoubleUtil.round(Double.parseDouble(array.get(15)), 2, 5) + "');");
            fileWriter.write("\r\n");
            fileWriter.flush();
        }
        fileWriter.close();
    }

    /**
     * 作者 LYC
     * 时间 2022/9/12 9:44
     * 参数 [list]
     * 返回值 void
     * 方法描述：考勤-综合部
     **/
    public static void EFF_CHECKWORK(ArrayList<ArrayList<String>> list, String _date) throws IOException {
        FileWriter fileWriter = new FileWriter(getFilePath(_date), true);
        fileWriter.write("-- EFF_CHECKWORK考勤-综合部");
        fileWriter.write("\r\n");
        fileWriter.flush();
        for (int i = 0; i < list.size(); i++) {
            ArrayList<String> array = list.get(i);
//            System.out.println(list.get(i));
            System.out.println("insert into EFF_CHECKWORK(ASSESSMENT,PER_NAME,LATE,ABSENTEEISM,ANNUAL_LEAVE,COMPASSIONATE_LEAVE," +
                    "SICK_LEAVE,MARRIAGE_HOLIDAY,MATERNITY_LEAVE,PATERNITY_LEAVE,FUNERAL_LEAVE,LEAVE,OTHER) " +
                    "values('" + _date + "','" + array.get(1) + "','" + array.get(2) + "'," +
                    "'" + array.get(3) + "','" + array.get(4) + "'," +
                    "'" + array.get(5) + "','" + array.get(6) + "','" + array.get(7) + "'," +
                    "'" + array.get(8) + "','" + array.get(9) + "','" + array.get(10) + "','" + array.get(11) + "','" + array.get(12) + "');");
            fileWriter.write("insert into EFF_CHECKWORK(ASSESSMENT,PER_NAME,LATE,ABSENTEEISM,ANNUAL_LEAVE,COMPASSIONATE_LEAVE," +
                    "SICK_LEAVE,MARRIAGE_HOLIDAY,MATERNITY_LEAVE,PATERNITY_LEAVE,FUNERAL_LEAVE,LEAVE,OTHER) " +
                    "values('" + _date + "','" + array.get(1) + "','" + array.get(2) + "'," +
                    "'" + array.get(3) + "','" + array.get(4) + "'," +
                    "'" + array.get(5) + "','" + array.get(6) + "','" + array.get(7) + "'," +
                    "'" + array.get(8) + "','" + array.get(9) + "','" + array.get(10) + "','" + array.get(11) + "','" + array.get(12) + "');");
            fileWriter.write("\r\n");
        }
        fileWriter.close();
    }

    /**
     * 作者 LYC
     * 时间 2022/9/12 10:00
     * 参数 [list]
     * 返回值 void
     * 方法描述： 合同回收-综合部
     **/
    public static void EFF_CONTRACT(ArrayList<ArrayList<String>> list, String _date) throws IOException {
        FileWriter fileWriter = new FileWriter(getFilePath(_date), true);
        fileWriter.write("-- EFF_CONTRACT合同回收-综合部");
        fileWriter.write("\r\n");
        fileWriter.flush();
        for (int i = 1; i < list.size(); i++) {
            ArrayList<String> array = list.get(i);
//            System.out.println(list.get(i));
            System.out.println("insert into EFF_CONTRACT(ASSESSMENT,PER_NAME,CONTRACTNO_NAME,CONTRACT_TYPE) values('" + _date + "'," +
                    "'" + array.get(1).replaceAll(" ", "") + "','" + array.get(2) + "','" + array.get(3) + "');");
            fileWriter.write("insert into EFF_CONTRACT(ASSESSMENT,PER_NAME,CONTRACTNO_NAME,CONTRACT_TYPE) values('" + _date + "'," +
                    "'" + array.get(1).replaceAll(" ", "") + "','" + array.get(2) + "','" + array.get(3) + "');");
            fileWriter.write("\r\n");
        }
        fileWriter.close();
    }

    /**
     * 作者 LYC
     * 时间 2022/9/12 10:11
     * 参数 [list]
     * 返回值 void
     * 方法描述：客户工单派工情况
     **/
    public static void EFF_CUSTOMER_TASK(ArrayList<ArrayList<String>> list, String _date) throws IOException {
        FileWriter fileWriter = new FileWriter(getFilePath(_date), true);
        fileWriter.write("-- EFF_CUSTOMER_TASK客户工单派工情况");
        fileWriter.write("\r\n");
        fileWriter.flush();
        for (int i = 1; i < list.size(); i++) {
            ArrayList<String> array = list.get(i);
//            System.out.println(list.get(i));
            System.out.println("insert into EFF_CUSTOMER_TASK(ASSESSMENT,PER_NAME,TASKNO,TASKTYPE,TASKSTATUS,STATUSEND)" +
                    " values('" + _date + "','" + array.get(4) + "','" + array.get(0) + "','" + array.get(1) + "','" + array.get(2) + "','" + array.get(3).replaceAll("-", "") + "');");
            fileWriter.write("insert into EFF_CUSTOMER_TASK(ASSESSMENT,PER_NAME,TASKNO,TASKTYPE,TASKSTATUS,STATUSEND)" +
                    " values('" + _date + "','" + array.get(4) + "','" + array.get(0) + "','" + array.get(1) + "','" + array.get(2) + "','" + array.get(3).replaceAll("-", "") + "');");
            fileWriter.write("\r\n");
        }
        fileWriter.close();
    }

    /**
     * 作者 LYC
     * 时间 2022/9/12 10:37
     * 参数 [list]
     * 返回值 void
     * 方法描述：营销联盟垫款明细-综合部
     **/
    public static void EFF_MARKET_ADVANCES(ArrayList<ArrayList<String>> list, String _date) throws IOException {
        FileWriter fileWriter = new FileWriter(getFilePath(_date), true);
        fileWriter.write("-- EFF_MARKET_ADVANCES营销联盟垫款明细-综合部");
        fileWriter.write("\r\n");
        fileWriter.flush();
        for (int i = 2; i < list.size(); i++) {
            ArrayList<String> array = list.get(i);
//            System.out.println(list.get(i));
            System.out.println("insert into EFF_MARKET_ADVANCES(ASSESSMENT,PER_NAME,ACTIVITY_NAME,START_DATE,END_DATE,FEETYPE,AMOUNT,OVERDUE_AMOUNT)" +
                    " values('" + _date + "','" + array.get(0).replaceAll("\t", "") + "','" + array.get(1).replaceAll("\t", "") + "'," +
                    "'" + array.get(2).replaceAll("\t", "") + "'," +
                    "'" + array.get(3).replaceAll("\t", "") + "','" + array.get(4).replaceAll("\t", "") + "'," +
                    "'" + DoubleUtil.round(Double.parseDouble(array.get(2)), 2, 5) + "'," +
                    "'" + DoubleUtil.round(Double.parseDouble(array.get(2)), 2, 5)
                    + "');");
            fileWriter.write("insert into EFF_MARKET_ADVANCES(ASSESSMENT,PER_NAME,ACTIVITY_NAME,START_DATE,END_DATE,FEETYPE,AMOUNT,OVERDUE_AMOUNT)" +
                    " values('" + _date + "','" + array.get(0).replaceAll("\t", "") + "','" + array.get(1).replaceAll("\t", "") + "'," +
                    "'" + array.get(2).replaceAll("\t", "") + "'," +
                    "'" + array.get(3).replaceAll("\t", "") + "','" + array.get(4).replaceAll("\t", "") + "'," +
                    "'" + DoubleUtil.round(Double.parseDouble(array.get(2)), 2, 5) + "'," +
                    "'" + DoubleUtil.round(Double.parseDouble(array.get(2)), 2, 5)
                    + "');");
            fileWriter.write("\r\n");
        }
        fileWriter.close();
    }

    /**
     * 作者 LYC
     * 时间 2022/9/12 10:49
     * 参数 [list]
     * 返回值 void
     * 方法描述：营销联盟应收票据明细-综合部
     **/
    public static void EFF_MARKET_INVOICE(ArrayList<ArrayList<String>> list, String _date) throws IOException {
        FileWriter fileWriter = new FileWriter(getFilePath(_date), true);
        fileWriter.write("-- EFF_MARKET_INVOICE营销联盟应收票据明细-综合部");
        fileWriter.write("\r\n");
        fileWriter.flush();
        // System.out.println(list.size());
        for (int i = 2; i < list.size(); i++) {
            ArrayList<String> array = list.get(i);
//            System.out.println(list.get(i));
            System.out.println("insert into EFF_MARKET_INVOICE(ASSESSMENT,PER_NAME,MERNAME,AMOUNT_SUM,RECEIVED_AMOUNT,SURPLUS_AMOUNT,PROPORTION,CONTRACT_NO)" +
                    "values('" + _date + "','" + array.get(2).replaceAll("\t", "") + "','" + array.get(0).replaceAll("\t", "") + "'," +
                    "'" + DoubleUtil.round(Double.parseDouble(array.get(5).replaceAll("\t", "")), 2, 3) + "'," +
                    "'" + DoubleUtil.round(Double.parseDouble(array.get(6).replaceAll("\t", "")), 2, 5) + "'," +
                    "'" + DoubleUtil.round(Double.parseDouble(array.get(4).replaceAll("\t", "")), 2, 5) + "'," +
                    "'" + array.get(3).replaceAll("\t", "") + "','" + array.get(2).replaceAll("\t", "") + "');");
            fileWriter.write("insert into EFF_MARKET_INVOICE(ASSESSMENT,PER_NAME,MERNAME,AMOUNT_SUM,RECEIVED_AMOUNT,SURPLUS_AMOUNT,PROPORTION,CONTRACT_NO)" +
                    "values('" + _date + "','" + array.get(2).replaceAll("\t", "") + "','" + array.get(0).replaceAll("\t", "") + "'," +
                    "'" + DoubleUtil.round(Double.parseDouble(array.get(5).replaceAll("\t", "")), 2, 3) + "'," +
                    "'" + DoubleUtil.round(Double.parseDouble(array.get(6).replaceAll("\t", "")), 2, 5) + "'," +
                    "'" + DoubleUtil.round(Double.parseDouble(array.get(4).replaceAll("\t", "")), 2, 5) + "'," +
                    "'" + array.get(3).replaceAll("\t", "") + "','" + array.get(2).replaceAll("\t", "") + "');");
            fileWriter.write("\r\n");
        }
        fileWriter.close();
    }

    /**
     * 作者 LYC
     * 时间 2022/9/12 11:18
     * 参数 [list]
     * 返回值 void
     * 方法描述：特约商户管理-入网3个月内确认风险
     **/
    public static void EFF_MERCHANT_TABLE1(ArrayList<ArrayList<String>> list, String _date) throws IOException {
        FileWriter fileWriter = new FileWriter(getFilePath(_date), true);
        fileWriter.write("-- EFF_MERCHANT_TABLE1特约商户管理-入网3个月内确认风险");
        fileWriter.write("\r\n");
        fileWriter.flush();
        for (int i = 1; i < list.size(); i++) {
            ArrayList<String> array = list.get(i);
//            System.out.println(list.get(i));
            System.out.println("insert into EFF_MERCHANT_TABLE1(ASSESSMENT,PER_NAME,MERNAME,MERCHNO,REMARK1) " +
                    "values('" + _date + "','" + array.get(1) + "','" + array.get(2) + "','" + array.get(3) + "','" + array.get(4) + "');");
            fileWriter.write("insert into EFF_MERCHANT_TABLE1(ASSESSMENT,PER_NAME,MERNAME,MERCHNO,REMARK1) " +
                    "values('" + _date + "','" + array.get(1) + "','" + array.get(2) + "','" + array.get(3) + "','" + array.get(4) + "');");
            fileWriter.write("\r\n");

        }
        fileWriter.close();
    }

    /**
     * 作者 LYC
     * 时间 2022/9/12 14:38
     * 参数 [list]
     * 返回值 void
     * 方法描述：特约商户管理-风险调查核实移机失踪
     **/
    public static void EFF_MERCHANT_TABLE2(ArrayList<ArrayList<String>> list, String _date) throws IOException {
        FileWriter fileWriter = new FileWriter(getFilePath(_date), true);
        fileWriter.write("-- EFF_MERCHANT_TABLE2特约商户管理-风险调查核实移机失踪");
        fileWriter.write("\r\n");
        fileWriter.flush();
        for (int i = 1; i < list.size(); i++) {
            ArrayList<String> array = list.get(i);
//            System.out.println(list.get(i));
            System.out.println("insert into EFF_MERCHANT_TABLE2(ASSESSMENT,PER_NAME,MERNAME,MERCHNO,TERMNO) " +
                    "values('" + _date + "','" + array.get(1) + "','" + array.get(2) + "','" + array.get(3) + "','" + array.get(4) + "');");
            fileWriter.write("insert into EFF_MERCHANT_TABLE2(ASSESSMENT,PER_NAME,MERNAME,MERCHNO,TERMNO) " +
                    "values('" + _date + "','" + array.get(1) + "','" + array.get(2) + "','" + array.get(3) + "','" + array.get(4) + "');");
            fileWriter.write("\r\n");

        }
        fileWriter.close();
    }

    /**
     * 作者 LYC
     * 时间 2022/9/12 14:44
     * 参数 [list]
     * 返回值 void
     * 方法描述：特约商户管理-未落商户实名制、协助商户弄虚作假
     **/
    public static void EFF_MERCHANT_TABLE3(ArrayList<ArrayList<String>> list, String _date) throws IOException {
        FileWriter fileWriter = new FileWriter(getFilePath(_date), true);
        fileWriter.write("-- EFF_MERCHANT_TABLE3特约商户管理-未落商户实名制、协助商户弄虚作假");
        fileWriter.write("\r\n");
        fileWriter.flush();
        for (int i = 1; i < list.size(); i++) {
            ArrayList<String> array = list.get(i);
            System.out.println("insert into EFF_MERCHANT_TABLE3(ASSESSMENT,PER_NAME,MERNAME,MERCHNO,TERMNO) " +
                    "values('" + _date + "','" + array.get(1) + "','" + array.get(2) + "','" + array.get(3) + "','" + array.get(4) + "');");
            fileWriter.write("insert into EFF_MERCHANT_TABLE3(ASSESSMENT,PER_NAME,MERNAME,MERCHNO,TERMNO) " +
                    "values('" + _date + "','" + array.get(1) + "','" + array.get(2) + "','" + array.get(3) + "','" + array.get(4) + "');");
            fileWriter.write("\r\n");
        }
        fileWriter.close();
    }

    /**
     * 作者 LYC
     * 时间 2022/9/12 14:46
     * 参数 [list]
     * 返回值 void
     * 方法描述：特约商户管理-引发风险事件
     **/
    public static void EFF_MERCHANT_TABLE4(ArrayList<ArrayList<String>> list, String _date) throws IOException {
        FileWriter fileWriter = new FileWriter(getFilePath(_date), true);
        fileWriter.write("-- EFF_ACCOUNTS_RECEIVABLE特约商户管理-引发风险事件");
        fileWriter.write("\r\n");
        fileWriter.flush();
        for (int i = 1; i < list.size(); i++) {
            ArrayList<String> array = list.get(i);
            System.out.println("insert into EFF_MERCHANT_TABLE4(ASSESSMENT,PER_NAME,MERNAME,MERCHNO,TERMNO,REMARK1) " +
                    "values('" + _date + "','" + array.get(1) + "','" + array.get(2) + "','" + array.get(3) + "','" + array.get(4) + "','" + array.get(5) + "');");
            fileWriter.write("insert into EFF_MERCHANT_TABLE4(ASSESSMENT,PER_NAME,MERNAME,MERCHNO,TERMNO,REMARK1) " +
                    "values('" + _date + "','" + array.get(1) + "','" + array.get(2) + "','" + array.get(3) + "','" + array.get(4) + "','" + array.get(5) + "');");
            fileWriter.write("\r\n");
        }
        fileWriter.close();
    }

    /**
     * 作者 LYC
     * 时间 2022/9/12 14:49
     * 参数 [list]
     * 返回值 void
     * 方法描述：特约商户管理-逾期未撤销
     **/
    public static void EFF_MERCHANT_TABLE5(ArrayList<ArrayList<String>> list, String _date) throws IOException {
        FileWriter fileWriter = new FileWriter(getFilePath(_date), true);
        fileWriter.write("-- EFF_MERCHANT_TABLE5特约商户管理-逾期未撤销");
        fileWriter.write("\r\n");
        fileWriter.flush();
        for (int i = 1; i < list.size(); i++) {
            ArrayList<String> array = list.get(i);
            System.out.println("insert into EFF_MERCHANT_TABLE5(ASSESSMENT,PER_NAME,MERNAME,MERCHNO,TERMNO) " +
                    "values('" + _date + "','" + array.get(1) + "','" + array.get(2) + "','" + array.get(3) + "','" + array.get(4) + "');");
            fileWriter.write("insert into EFF_MERCHANT_TABLE5(ASSESSMENT,PER_NAME,MERNAME,MERCHNO,TERMNO) " +
                    "values('" + _date + "','" + array.get(1) + "','" + array.get(2) + "','" + array.get(3) + "','" + array.get(4) + "');");
            fileWriter.write("\r\n");
        }
        fileWriter.close();
    }

    /**
     * 作者 LYC
     * 时间 2022/9/12 14:50
     * 参数 [list]
     * 返回值 void
     * 方法描述：特约商户管理-其他纳入风险考核
     **/
    public static void EFF_MERCHANT_TABLE6(ArrayList<ArrayList<String>> list, String _date) throws IOException {
        FileWriter fileWriter = new FileWriter(getFilePath(_date), true);
        fileWriter.write("-- EFF_MERCHANT_TABLE6特约商户管理-其他纳入风险考核");
        fileWriter.write("\r\n");
        fileWriter.flush();
        for (int i = 1; i < list.size(); i++) {
            ArrayList<String> array = list.get(i);
            System.out.println("insert into EFF_MERCHANT_TABLE6(ASSESSMENT,PER_NAME,MERNAME,MERCHNO,TERMNO) " +
                    "values('" + _date + "','" + array.get(1) + "','" + array.get(2) + "','" + array.get(3) + "','" + array.get(4) + "');");
            fileWriter.write("insert into EFF_MERCHANT_TABLE6(ASSESSMENT,PER_NAME,MERNAME,MERCHNO,TERMNO) " +
                    "values('" + _date + "','" + array.get(1) + "','" + array.get(2) + "','" + array.get(3) + "','" + array.get(4) + "');");
            fileWriter.write("\r\n");
        }
        fileWriter.close();
    }

    /**
     * 作者 LYC
     * 时间 2022/9/12 15:05
     * 参数 [list]
     * 返回值 void
     * 方法描述：负收益-业务部
     **/
    public static void EFF_NEGATIVE_RETURN(ArrayList<ArrayList<String>> list, String _date) throws IOException {
        FileWriter fileWriter = new FileWriter(getFilePath(_date), true);
        fileWriter.write("-- EFF_NEGATIVE_RETURN负收益-业务部");
        fileWriter.write("\r\n");
        fileWriter.flush();
        for (int i = 1; i < list.size(); i++) {
            ArrayList<String> array = list.get(i);
//                System.out.println(list.get(i));
            System.out.println("insert into EFF_NEGATIVE_RETURN(ASSESSMENT,PER_NAME,MERNCHNO,MERNAME,AMTNUM,AMOUNT,FEE,F_FEE,UNION_FEE,UMS_FEE)" +
                    "values('" + _date + "','" + array.get(9) + "','" + array.get(0) + "','" + array.get(2) + "','" + array.get(3) + "'," +
                    "'" + DoubleUtil.round(Double.parseDouble(array.get(4)), 2, 5) + "'," +
                    "'" + DoubleUtil.round(Double.parseDouble(array.get(5)), 2, 5) + "'," +
                    "'" + DoubleUtil.round(Double.parseDouble(array.get(6)), 2, 5) + "'," +
                    "'" + DoubleUtil.round(Double.parseDouble(array.get(7)), 2, 5) + "'," +
                    "'" + DoubleUtil.round(Double.parseDouble(array.get(8)), 2, 5) + "');");
            fileWriter.write("insert into EFF_NEGATIVE_RETURN(ASSESSMENT,PER_NAME,MERNCHNO,MERNAME,AMTNUM,AMOUNT,FEE,F_FEE,UNION_FEE,UMS_FEE)" +
                    "values('" + _date + "','" + array.get(9) + "','" + array.get(0) + "','" + array.get(2) + "','" + array.get(3) + "'," +
                    "'" + DoubleUtil.round(Double.parseDouble(array.get(4)), 2, 5) + "'," +
                    "'" + DoubleUtil.round(Double.parseDouble(array.get(5)), 2, 5) + "'," +
                    "'" + DoubleUtil.round(Double.parseDouble(array.get(6)), 2, 5) + "'," +
                    "'" + DoubleUtil.round(Double.parseDouble(array.get(7)), 2, 5) + "'," +
                    "'" + DoubleUtil.round(Double.parseDouble(array.get(8)), 2, 5) + "');");
            fileWriter.write("\r\n");
        }
        fileWriter.close();
    }

    /**
     * 作者 LYC
     * 时间 2022/9/12 15:15
     * 参数 [list]
     * 返回值 void
     * 方法描述：OA代办-综合部
     **/
    public static void EFF_OA_INFO(ArrayList<ArrayList<String>> list, String _date) throws IOException {
        System.out.println("=========");
        FileWriter fileWriter = new FileWriter(getFilePath(_date), true);
        fileWriter.write("-- EFF_OA_INFOOA代办-综合部");
        fileWriter.write("\r\n");
        fileWriter.flush();
        for (int i = 1; i < list.size(); i++) {
            ArrayList<String> array = list.get(i);
//                System.out.println(list.get(i));
            System.out.println("insert into EFF_OA_INFO(ASSESSMENT,PER_NAME,OA_NAME) values('" + _date + "','" + array.get(1) + "','" + array.get(2) + "');");
            fileWriter.write("insert into EFF_OA_INFO(ASSESSMENT,PER_NAME,OA_NAME) values('" + _date + "','" + array.get(1) + "','" + array.get(2) + "');");
            fileWriter.write("\r\n");
        }
        fileWriter.close();
    }

    /**
     * 作者 LYC
     * 时间 2022/9/12 15:21
     * 参数 [list]
     * 返回值 void
     * 方法描述：超期POS押金
     **/
    public static void EFF_POS_DEPOSIT(ArrayList<ArrayList<String>> list, String _date) throws IOException {
        FileWriter fileWriter = new FileWriter(getFilePath(_date), true);
        fileWriter.write("-- EFF_POS_DEPOSIT超期POS押金");
        fileWriter.write("\r\n");
        fileWriter.flush();
        for (int i = 1; i < list.size(); i++) {
            ArrayList<String> array = list.get(i);
//            System.out.println(list.get(i));
            System.out.println("insert into EFF_POS_DEPOSIT(ASSESSMENT,PER_NAME,MERNAME,MERCHNO,TERMNO,FEETYPE,AMOUNT) " +
                    "values('" + _date + "','" + array.get(0) + "','" + array.get(1) + "','" + array.get(2) + "','" + array.get(3) + "','" + array.get(4) + "'," +
                    "'" + DoubleUtil.round(Double.parseDouble(array.get(5)), 2, 5) + "');");
            fileWriter.write("insert into EFF_POS_DEPOSIT(ASSESSMENT,PER_NAME,MERNAME,MERCHNO,TERMNO,FEETYPE,AMOUNT) " +
                    "values('" + _date + "','" + array.get(0) + "','" + array.get(1) + "','" + array.get(2) + "','" + array.get(3) + "','" + array.get(4) + "'," +
                    "'" + DoubleUtil.round(Double.parseDouble(array.get(5)), 2, 5) + "');");
            fileWriter.write("\r\n");
        }
        fileWriter.close();
    }

    /**
     * 作者 LYC
     * 时间 2022/9/12 15:50
     * 参数 [list]
     * 返回值 void
     * 方法描述：资金暂缓- 风险部
     **/
    public static void EFF_RISK_FUND_SUSPENSION(ArrayList<ArrayList<String>> list, String _date) throws IOException {
        FileWriter fileWriter = new FileWriter(getFilePath(_date), true);
        fileWriter.write("-- EFF_RISK_FUND_SUSPENSION资金暂缓- 风险部");
        fileWriter.write("\r\n");
        fileWriter.flush();
        for (int i = 1; i < list.size(); i++) {
            ArrayList<String> array = list.get(i);
//            System.out.println(list.get(i));
            System.out.println("insert into EFF_RISK_FUND_SUSPENSION(ASSESSMENT,PER_NAME,MERCHNO,MERNAME,TEMPORARY_DATE,TEMPORARY_REMARK,TEMPORARY_AMOUNT) " +
                    "values('" + _date + "','" + array.get(1) + "','" + array.get(2) + "','" + array.get(3) + "','" + array.get(4) + "','" + array.get(5) + "'," +
                    "'" + DoubleUtil.round(Double.parseDouble(array.get(6)), 2, 5) + "');");
            fileWriter.write("insert into EFF_RISK_FUND_SUSPENSION(ASSESSMENT,PER_NAME,MERCHNO,MERNAME,TEMPORARY_DATE,TEMPORARY_REMARK,TEMPORARY_AMOUNT) " +
                    "values('" + _date + "','" + array.get(1) + "','" + array.get(2) + "','" + array.get(3) + "','" + array.get(4) + "','" + array.get(5) + "'," +
                    "'" + DoubleUtil.round(Double.parseDouble(array.get(6)), 2, 5) + "');");
            fileWriter.write("\r\n");
        }
        fileWriter.close();
    }

    /**
     * 作者 LYC
     * 时间 2022/9/12 15:57
     * 参数 [list]
     * 返回值 void
     * 方法描述：风险派工-工单
     **/
    public static void EFF_RISK_TASK(ArrayList<ArrayList<String>> list, String _date) throws IOException {
        FileWriter fileWriter = new FileWriter(getFilePath(_date), true);
        fileWriter.write("-- EFF_RISK_TASK风险派工-工单");
        fileWriter.write("\r\n");
        fileWriter.flush();
        for (int i = 1; i < list.size(); i++) {
            ArrayList<String> array = list.get(i);
//            System.out.println(list.get(i));
            System.out.println("insert into EFF_RISK_TASK(ASSESSMENT,PER_NAME,MERNAME,MERCHNO) values('" + _date + "','" + array.get(1) + "'," +
                    "'" + array.get(2) + "','" + array.get(3) + "');");
            fileWriter.write("insert into EFF_RISK_TASK(ASSESSMENT,PER_NAME,MERNAME,MERCHNO) values('" + _date + "','" + array.get(1) + "'," +
                    "'" + array.get(2) + "','" + array.get(3) + "');");
            fileWriter.write("\r\n");
        }
        fileWriter.close();
    }

    /**
     * 作者 LYC
     * 时间 2022/9/12 16:20
     * 参数 [list]
     * 返回值 void
     * 方法描述：风险派工-逾期
     **/
    //TODO 此表在有数据的时候，需要在新增数据后单独计算超期天数（OVERDUE_DAY）
    public static void EFF_RISK_TASK_OVERDUE(ArrayList<ArrayList<String>> list, String _date) throws IOException {
        FileWriter fileWriter = new FileWriter(getFilePath(_date), true);
        fileWriter.write("-- EFF_RISK_TASK_OVERDUE风险派工-逾期");
        fileWriter.write("\r\n");
        fileWriter.flush();
        for (int i = 1; i < list.size(); i++) {
            ArrayList<String> array = list.get(i);
//            System.out.println(list.get(i));
            System.out.println("insert into EFF_RISK_TASK_OVERDUE(ASSESSMENT,PER_NAME,MERCHNO,TERMNO,STARTDATE,ENDDATE,MERNAME) " +
                    "values('" + _date + "','" + array.get(1) + "','" + array.get(3) + "','" + array.get(4) + "','" + array.get(5) + "','" + array.get(6) + "','" + array.get(2) + "');");
            fileWriter.write("insert into EFF_RISK_TASK_OVERDUE(ASSESSMENT,PER_NAME,MERCHNO,TERMNO,STARTDATE,ENDDATE,MERNAME) " +
                    "values('" + _date + "','" + array.get(1) + "','" + array.get(3) + "','" + array.get(4) + "','" + array.get(5) + "','" + array.get(6) + "','" + array.get(2) + "');");
            fileWriter.write("\r\n");
        }
        fileWriter.close();
    }

    /**
     * 作者 LYC
     * 时间 2022/9/12 16:24
     * 参数 [list]
     * 返回值 void
     * 方法描述：风险派工-不合格
     **/
    public static void EFF_RISK_TASK_UNQUALIFIED(ArrayList<ArrayList<String>> list, String _date) throws IOException {
        FileWriter fileWriter = new FileWriter(getFilePath(_date), true);
        fileWriter.write("-- EFF_RISK_TASK_UNQUALIFIED风险派工-不合格");
        fileWriter.write("\r\n");
        fileWriter.flush();
        for (int i = 1; i < list.size(); i++) {
            ArrayList<String> array = list.get(i);
//            System.out.println(list.get(i));
            System.out.println("insert into EFF_RISK_TASK_UNQUALIFIED(ASSESSMENT,PER_NAME,MERNAME,MERCHNO,REMARK) " +
                    "values('" + _date + "','" + array.get(1) + "','" + array.get(2) + "','" + array.get(3) + "','" + array.get(5) + "');");
            fileWriter.write("insert into EFF_RISK_TASK_UNQUALIFIED(ASSESSMENT,PER_NAME,MERNAME,MERCHNO,REMARK) " +
                    "values('" + _date + "','" + array.get(1) + "','" + array.get(2) + "','" + array.get(3) + "','" + array.get(5) + "');");
            fileWriter.write("\r\n");
        }
        fileWriter.close();
    }

    /**
     * 作者 LYC
     * 时间 2022/9/12 16:32
     * 参数 [list]
     * 返回值 void
     * 方法描述：银商学堂
     **/
    //TODO 需单新增数据之后，更新PROPORTION 在数据库为百分比
    public static void EFF_UMS_SCHOOL(ArrayList<ArrayList<String>> list, String _date) throws IOException {
        FileWriter fileWriter = new FileWriter(getFilePath(_date), true);
        fileWriter.write("-- EFF_UMS_SCHOOL银商学堂");
        fileWriter.write("\r\n");
        fileWriter.flush();
        for (int i = 1; i < list.size(); i++) {
            ArrayList<String> array = list.get(i);
            System.out.println("insert into EFF_UMS_SCHOOL(ASSESSMENT,PER_NAME,COMPLETE,TASK,PROPORTION) " +
                    "values('" + _date + "','" + array.get(1) + "','" + array.get(2) + "','" + array.get(3) + "','" + array.get(4) + "');");
            fileWriter.write("insert into EFF_UMS_SCHOOL(ASSESSMENT,PER_NAME,COMPLETE,TASK,PROPORTION) " +
                    "values('" + _date + "','" + array.get(1) + "','" + array.get(3) + "','" + array.get(4) + "','" + array.get(5) + "');");
            fileWriter.write("\r\n");
        }
        fileWriter.close();
    }

    /**
     * 作者 LYC
     * 时间 2022/9/12 16:59
     * 参数 [list]
     * 返回值 void
     * 方法描述：终端效能-终端部
     **/
    public static void EFF_POS_EFFICIENCY(ArrayList<ArrayList<String>> list, String _date) throws IOException {
        FileWriter fileWriter = new FileWriter(getFilePath(_date), true);
        fileWriter.write("-- EFF_ACCOUNTS_RECEIVABLE终端效能-终端部");
        fileWriter.write("\r\n");
        fileWriter.flush();
        for (int i = 1; i < list.size(); i++) {
            ArrayList<String> array = list.get(i);
            //新装机下装（台）
            if ("新装机下装（台）".equals(array.get(1))) {
                System.out.println("insert into EFF_POS_EFFICIENCY(ASSESSMENT,PER_NAME,NEW_CLOTHES) values('" + _date + "','" + array.get(2) + "','" + array.get(3) + "');");
                fileWriter.write("insert into EFF_POS_EFFICIENCY(ASSESSMENT,PER_NAME,NEW_CLOTHES) values('" + _date + "','" + array.get(2) + "','" + array.get(3) + "');");
                fileWriter.write("\r\n");
            }
            //换机下装（台）
            if ("换机下装（台）".equals(array.get(1))) {
                System.out.println("insert into EFF_POS_EFFICIENCY(ASSESSMENT,PER_NAME,REPLACEMENT) values('" + _date + "','" + array.get(2) + "','" + array.get(3) + "');");
                fileWriter.write("insert into EFF_POS_EFFICIENCY(ASSESSMENT,PER_NAME,REPLACEMENT) values('" + _date + "','" + array.get(2) + "','" + array.get(3) + "');");
                fileWriter.write("\r\n");
            }
            //终端撤机回收（台）
            if ("终端撤机回收（台）".equals(array.get(1))) {
                System.out.println("insert into EFF_POS_EFFICIENCY(ASSESSMENT,PER_NAME,WITHDRAWAL_AND_RECOVERY) values('" + _date + "','" + array.get(2) + "','" + array.get(3) + "');");
                fileWriter.write("insert into EFF_POS_EFFICIENCY(ASSESSMENT,PER_NAME,WITHDRAWAL_AND_RECOVERY) values('" + _date + "','" + array.get(2) + "','" + array.get(3) + "');");
                fileWriter.write("\r\n");
            }

            //终端换机回收（台）
            if ("终端换机回收（台）".equals(array.get(1))) {
                System.out.println("insert into EFF_POS_EFFICIENCY(ASSESSMENT,PER_NAME,REPLACEMENT_RECOVERY) values('" + _date + "','" + array.get(2) + "','" + array.get(3) + "');");
                fileWriter.write("insert into EFF_POS_EFFICIENCY(ASSESSMENT,PER_NAME,REPLACEMENT_RECOVERY) values('" + _date + "','" + array.get(2) + "','" + array.get(3) + "');");
                fileWriter.write("\r\n");
            }
            //撤机流程核销（条）
            if ("撤机流程核销（条）".equals(array.get(1))) {
                System.out.println("insert into EFF_POS_EFFICIENCY(ASSESSMENT,PER_NAME,PROCESS_WRITE_OFF) values('" + _date + "','" + array.get(2) + "','" + array.get(3) + "');");
                fileWriter.write("insert into EFF_POS_EFFICIENCY(ASSESSMENT,PER_NAME,PROCESS_WRITE_OFF) values('" + _date + "','" + array.get(2) + "','" + array.get(3) + "');");
                fileWriter.write("\r\n");
            }
            //出库（台）
            if ("出库（台）".equals(array.get(1))) {
                System.out.println("insert into EFF_POS_EFFICIENCY(ASSESSMENT,PER_NAME,EX_WAREHOUSE) values('" + _date + "','" + array.get(2) + "','" + array.get(3) + "');");
                fileWriter.write("insert into EFF_POS_EFFICIENCY(ASSESSMENT,PER_NAME,EX_WAREHOUSE) values('" + _date + "','" + array.get(2) + "','" + array.get(3) + "');");
                fileWriter.write("\r\n");
            }
            //入库（台）
            if ("入库（台）".equals(array.get(1))) {
                System.out.println("insert into EFF_POS_EFFICIENCY(ASSESSMENT,PER_NAME,WAREHOUSING) values('" + _date + "','" + array.get(2) + "','" + array.get(3) + "');");
                fileWriter.write("insert into EFF_POS_EFFICIENCY(ASSESSMENT,PER_NAME,WAREHOUSING) values('" + _date + "','" + array.get(2) + "','" + array.get(3) + "');");
                fileWriter.write("\r\n");
            }
            //报损（台）
            if ("报损（台）".equals(array.get(1))) {
                System.out.println("insert into EFF_POS_EFFICIENCY(ASSESSMENT,PER_NAME,LOSS_REPORTING) values('" + _date + "','" + array.get(2) + "','" + array.get(3) + "');");
                fileWriter.write("insert into EFF_POS_EFFICIENCY(ASSESSMENT,PER_NAME,LOSS_REPORTING) values('" + _date + "','" + array.get(2) + "','" + array.get(3) + "');");
                fileWriter.write("\r\n");
            }
            //报废（台）
            if ("报废（台）".equals(array.get(1))) {
                System.out.println("insert into EFF_POS_EFFICIENCY(ASSESSMENT,PER_NAME,SCRAP) values('" + _date + "','" + array.get(2) + "','" + array.get(3) + "');");
                fileWriter.write("insert into EFF_POS_EFFICIENCY(ASSESSMENT,PER_NAME,SCRAP) values('" + _date + "','" + array.get(2) + "','" + array.get(3) + "');");
                fileWriter.write("\r\n");
            }
            //终端外观清理（台）
            if ("终端外观清理（台）".equals(array.get(1))) {
                System.out.println("insert into EFF_POS_EFFICIENCY(ASSESSMENT,PER_NAME,APPEARANCE) values('" + _date + "','" + array.get(2) + "','" + array.get(3) + "');");
                fileWriter.write("insert into EFF_POS_EFFICIENCY(ASSESSMENT,PER_NAME,APPEARANCE) values('" + _date + "','" + array.get(2) + "','" + array.get(3) + "');");
                fileWriter.write("\r\n");
            }
            //销售登记（台）
            if ("销售登记（台）".equals(array.get(1))) {
                System.out.println("insert into EFF_POS_EFFICIENCY(ASSESSMENT,PER_NAME,REGISTER) values('" + _date + "','" + array.get(2) + "','" + array.get(3) + "');");
                fileWriter.write("insert into EFF_POS_EFFICIENCY(ASSESSMENT,PER_NAME,REGISTER) values('" + _date + "','" + array.get(2) + "','" + array.get(3) + "');");
                fileWriter.write("\r\n");
            }
            //终端硬件检测、升级（台）
            if ("终端硬件检测、升级（台）".equals(array.get(1))) {
                System.out.println("insert into EFF_POS_EFFICIENCY(ASSESSMENT,PER_NAME,UPGRADE) values('" + _date + "','" + array.get(2) + "','" + array.get(3) + "');");
                fileWriter.write("insert into EFF_POS_EFFICIENCY(ASSESSMENT,PER_NAME,UPGRADE) values('" + _date + "','" + array.get(2) + "','" + array.get(3) + "');");
                fileWriter.write("\r\n");
            }
            //销售清理（台）
            if ("销售清理（台）".equals(array.get(1))) {
                System.out.println("insert into EFF_POS_EFFICIENCY(ASSESSMENT,PER_NAME,SALES_CLEARANCE) values('" + _date + "','" + array.get(2) + "','" + array.get(3) + "');");
                fileWriter.write("insert into EFF_POS_EFFICIENCY(ASSESSMENT,PER_NAME,SALES_CLEARANCE) values('" + _date + "','" + array.get(2) + "','" + array.get(3) + "');");
                fileWriter.write("\r\n");
            }
        }
        fileWriter.close();
    }

}